<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试计划 - 一体化作战平台</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#0066cc',
                        secondary: '#0099cc',
                        success: '#009966',
                        warning: '#ff9900',
                        danger: '#cc3300',
                        neutral: {
                            100: '#f5f7fa',
                            200: '#e4e7ed',
                            300: '#c0c4cc',
                            400: '#909399',
                            500: '#606266',
                            600: '#303133',
                            700: '#1f2937',
                        }
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif'],
                    },
                    boxShadow: {
                        'card': '0 2px 8px rgba(0, 0, 0, 0.08)',
                        'dropdown': '0 4px 16px rgba(0, 0, 0, 0.12)',
                    }
                },
            }
        }
    </script>
    
    <!-- 自定义工具类 -->
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
            }
            .transition-all-300 {
                transition: all 300ms ease-in-out;
            }
            .lazy-img {
                loading: lazy;
                transition: opacity 0.3s ease-in-out;
            }
            .lazy-img[data-loaded="false"] {
                opacity: 0;
            }
            .lazy-img[data-loaded="true"] {
                opacity: 1;
            }
        }
    </style>
    
    <style>
        .transition-all-300 {
            transition: all 300ms ease-in-out;
        }
        .scrollbar-hide {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        .scrollbar-hide::-webkit-scrollbar {
            display: none;
        }
        
        /* 优先级徽章样式 */
        .badge-priority-high {
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            border-radius: 9999px;
            background-color: #fee2e2;
            color: #dc2626;
        }
        .badge-priority-medium {
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            border-radius: 9999px;
            background-color: #fef3c7;
            color: #d97706;
        }
        .badge-priority-low {
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            border-radius: 9999px;
            background-color: #d1fae5;
            color: #059669;
        }
        
        /* 标签页样式 */
        .tab-button {
            transition: all 0.3s ease;
        }
        .tab-button.active {
            font-weight: 600;
        }
        .tab-button:hover {
            background-color: rgba(0, 102, 204, 0.05);
        }
        
        /* 表单获取焦点样式 */
        input:focus, select:focus, textarea:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
        }
        
        /* 弹窗样式 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        .modal-content {
            background: white;
            border-radius: 12px;
            width: 90%;
            max-width: 800px;
            max-height: 80vh;
            overflow: hidden;
            transform: scale(0.9);
            transition: transform 0.3s ease;
        }
        
        .modal-overlay.active .modal-content {
            transform: scale(1);
        }
        
        .modal-header {
            padding: 20px 24px;
            border-bottom: 1px solid #e5e7eb;
            display: flex;
            align-items: center;
            justify-content: between;
        }
        
        .modal-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #1f2937;
        }
        
        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: #6b7280;
            cursor: pointer;
            padding: 4px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        
        .modal-close:hover {
            background-color: #f3f4f6;
            color: #374151;
        }
        
        .modal-body {
            padding: 24px;
            max-height: 60vh;
            overflow-y: auto;
        }
        
        /* 测试用例列表样式 */
        .test-case-item {
            display: flex;
            align-items: center;
            justify-content: between;
            padding: 16px;
            border-bottom: 1px solid #f3f4f6;
            transition: background-color 0.2s ease;
        }
        
        .test-case-item:hover {
            background-color: #f9fafb;
        }
        
        .test-case-info {
            flex: 1;
            min-width: 0;
        }
        
        .test-case-name {
            font-weight: 500;
            color: #1f2937;
            margin-bottom: 4px;
        }
        
        .test-case-id {
            font-size: 0.875rem;
            color: #6b7280;
        }
        
        .test-case-status {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-right: 16px;
        }
        
        .status-badge {
            padding: 4px 8px;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 500;
        }
        
        .status-pending {
            background-color: #fef3c7;
            color: #d97706;
        }
        
        .status-paused {
            background-color: #e5e7eb;
            color: #6b7280;
        }
        
        .status-failed {
            background-color: #fee2e2;
            color: #dc2626;
        }
        
        .test-case-actions {
            position: relative;
        }
        
        .action-button {
            background: none;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            padding: 8px 12px;
            font-size: 0.875rem;
            color: #374151;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .action-button:hover {
            background-color: #f3f4f6;
            border-color: #9ca3af;
        }
        
        /* 下拉菜单样式 */
        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            min-width: 160px;
            z-index: 10;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: all 0.2s ease;
        }
        
        .dropdown-menu.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        
        .dropdown-item {
            display: block;
            width: 100%;
            padding: 12px 16px;
            border: none;
            background: none;
            text-align: left;
            font-size: 0.875rem;
            color: #374151;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }
        
        .dropdown-item:hover {
            background-color: #f3f4f6;
        }
        
        .dropdown-item:first-child {
            border-radius: 6px 6px 0 0;
        }
        
        .dropdown-item:last-child {
            border-radius: 0 0 6px 6px;
        }
        
        /* 状态选择器样式 */
        .status-selector {
            position: relative;
            display: inline-block;
            min-width: 120px;
        }
        
        .status-selector-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: white;
            cursor: pointer;
            font-size: 0.875rem;
            transition: all 0.2s ease;
            min-width: 120px;
        }
        
        .status-selector-toggle:hover {
            border-color: #9ca3af;
        }
        
        .status-selector-toggle.active {
            border-color: #0066cc;
            box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
        }
        
        .status-option {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        
        .status-dot.pending {
            background-color: #d97706;
        }
        
        .status-dot.paused {
            background-color: #6b7280;
        }
        
        .status-dot.failed {
            background-color: #dc2626;
        }
        
        .status-selector-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            z-index: 20;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: all 0.2s ease;
        }
        
        .status-selector-dropdown.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        
        .status-option-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
            cursor: pointer;
            font-size: 0.875rem;
            transition: background-color 0.2s ease;
        }
        
        .status-option-item:hover {
            background-color: #f3f4f6;
        }
        
        .status-option-item:first-child {
            border-radius: 6px 6px 0 0;
        }
        
        .status-option-item:last-child {
            border-radius: 0 0 6px 6px;
        }
        
        /* 状态选择器样式 */
        .status-selector {
            position: relative;
            display: inline-block;
            min-width: 120px;
        }
        
        .status-selector-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: white;
            cursor: pointer;
            font-size: 0.875rem;
            transition: all 0.2s ease;
            min-width: 120px;
        }
        
        .status-selector-toggle:hover {
            border-color: #9ca3af;
        }
        
        .status-selector-toggle.active {
            border-color: #0066cc;
            box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
        }
        
        .status-option {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        
        .status-dot.pending {
            background-color: #d97706;
        }
        
        .status-dot.paused {
            background-color: #6b7280;
        }
        
        .status-dot.failed {
            background-color: #dc2626;
        }
        
        .status-selector-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
            z-index: 20;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: all 0.2s ease;
        }
        
        .status-selector-dropdown.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        
        .status-option-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
            cursor: pointer;
            font-size: 0.875rem;
            transition: background-color 0.2s ease;
        }
        
        .status-option-item:hover {
            background-color: #f3f4f6;
        }
        
        .status-option-item:first-child {
            border-radius: 6px 6px 0 0;
        }
        
        .status-option-item:last-child {
            border-radius: 0 0 6px 6px;
        }
    </style>
</head>
<body class="bg-neutral-100 font-sans text-neutral-600 min-h-screen flex flex-col">
    <header class="bg-white shadow-sm fixed top-0 left-0 right-0 z-50">
        <div class="flex items-center justify-between px-4 py-3">
            <!-- Logo和标题 -->
            <div class="flex items-center space-x-3">
                <button id="menuToggle" class="md:hidden p-2 rounded-md hover:bg-neutral-100 transition-all-300">
                    <i class="fa fa-bars text-neutral-600"></i>
                </button>
                <div class="flex items-center space-x-2">
                    <div class="w-10 h-10 bg-primary rounded-md flex items-center justify-center text-white">
                        <i class="fa fa-bank text-xl"></i>
                    </div>
                    <h1 class="text-xl font-bold text-neutral-700 hidden md:block">一体化作战平台</h1>
                    <h1 class="text-lg font-bold text-neutral-700 md:hidden">研发交付平台</h1>
                </div>
            </div>
            
            <!-- 搜索框 -->
            <div class="hidden md:flex relative flex-1 max-w-md mx-4">
                <input type="text" placeholder="搜索任务..." 
                    class="w-full pl-10 pr-4 py-2 rounded-md border border-neutral-200 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary">
                <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-neutral-400"></i>
            </div>
            
            <!-- 右侧用户区域 -->
            <div class="flex items-center space-x-1 md:space-x-4">
                <!-- 通知按钮 -->
                <button class="relative p-2 rounded-full hover:bg-neutral-100 transition-all-300">
                    <i class="fa fa-bell-o text-lg text-neutral-600"></i>
                    <span class="absolute top-0 right-0 w-2 h-2 bg-danger rounded-full"></span>
                </button>
                
                <!-- 消息按钮 -->
                <button class="relative p-2 rounded-full hover:bg-neutral-100 transition-all-300 hidden md:block">
                    <i class="fa fa-envelope-o text-lg text-neutral-600"></i>
                    <span class="absolute top-0 right-0 w-2 h-2 bg-primary rounded-full"></span>
                </button>
                
                <!-- 用户头像 -->
                <div class="flex items-center space-x-2 ml-2">
                    <div class="w-8 h-8 bg-neutral-200 rounded-full overflow-hidden">
                        <img src="https://picsum.photos/id/1005/200/200" alt="用户头像" class="w-full h-full object-cover">
                    </div>
                    <span class="hidden md:block text-sm font-medium text-neutral-700">张三</span>
                </div>
            </div>
        </div>
    </header>

    <div class="flex pt-16 flex-1">
        <!-- 左侧导航菜单 -->
        <aside class="w-16 md:w-64 bg-white shadow-sm fixed h-full left-0 top-16 overflow-y-auto scrollbar-hide transform md:transform-none transition-transform duration-300 z-40 -translate-x-full md:translate-x-0">
            <nav class="py-4">
                <ul>
                    <!-- 主导航项 -->
                    <li class="mb-1">
                        <a href="index.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-tachometer text-lg"></i>
                            <span class="hidden md:block">首页</span>
                        </a>
                    </li>
                    
                    <!-- 交付流程模块 -->
                    <li class="mb-1">
                        <a href="business_strategy.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-line-chart text-lg"></i>
                            <span class="hidden md:block">业务战略</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="architecture-management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-sitemap text-lg"></i>
                            <span class="hidden md:block">架构管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="requirementsManagement.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-list-alt text-lg"></i>
                            <span class="hidden md:block">需求管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <div class="design-menu-wrapper">
                            <div class="flex items-center justify-between px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                                <a href="design_management.html" class="flex items-center space-x-3 flex-1" onclick="event.stopPropagation();">
                                    <i class="fa fa-paint-brush text-lg"></i>
                                    <span class="hidden md:block">设计管理</span>
                                </a>
                                <button id="design-menu-toggle" class="hidden md:block p-1 hover:bg-neutral-200 rounded transition-all" aria-label="展开/收起子菜单" onclick="event.stopPropagation();">
                                    <i class="fa fa-chevron-right text-xs transform transition-transform duration-300"></i>
                                </button>
                            </div>
                            <!-- 下拉子菜单 -->
                            <div id="design-submenu" class="hidden overflow-hidden transition-all duration-300 ease-in-out">
                                <div class="bg-neutral-50 py-1">
                                    <a href="interface_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-plug text-sm"></i>
                                        <span class="hidden md:block">接口管理</span>
                                    </a>
                                    <a href="model_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-cubes text-sm"></i>
                                        <span class="hidden md:block">模型管理</span>
                                    </a>
                                    <a href="data_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-database text-sm"></i>
                                        <span class="hidden md:block">字典管理</span>
                                    </a>
                                    <a href="ui_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-desktop text-sm"></i>
                                        <span class="hidden md:block">差异分析</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <li class="mb-1">
                        <a href="schedule_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-calendar text-lg"></i>
                            <span class="hidden md:block">排期管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="developmentMage.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-code text-lg"></i>
                            <span class="hidden md:block">开发管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <div class="test-menu-wrapper">
                            <div class="flex items-center justify-between px-4 py-3 text-primary bg-primary/5 border-r-4 border-primary">
                                <a href="testManagement.html" class="flex items-center space-x-3 flex-1" onclick="event.stopPropagation();">
                                    <i class="fa fa-bug text-lg"></i>
                                    <span class="hidden md:block font-medium">测试管理</span>
                                </a>
                                <button id="test-menu-toggle" class="hidden md:block p-1 hover:bg-neutral-200 rounded transition-all" aria-label="展开/收起子菜单" onclick="event.stopPropagation();">
                                    <i class="fa fa-chevron-right text-xs transform transition-transform duration-300"></i>
                                </button>
                            </div>
                            <!-- 下拉子菜单 -->
                            <div id="test-submenu" class="hidden overflow-hidden transition-all duration-300 ease-in-out">
                                <div class="bg-neutral-50 py-1">
                                    <a href="test_cases.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-file-text-o text-sm"></i>
                                        <span class="hidden md:block">测试案例</span>
                                    </a>
                                    <a href="test_plans.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-calendar-check-o text-sm"></i>
                                        <span class="hidden md:block">测试计划</span>
                                    </a>
                                    <a href="test_reports.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-bar-chart text-sm"></i>
                                        <span class="hidden md:block">测试报告</span>
                                    </a>
                                    <a href="test_global_settings.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-cogs text-sm"></i>
                                        <span class="hidden md:block">全局设置</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <li class="mb-1">
                        <a href="production_workflow.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-rocket text-lg"></i>
                            <span class="hidden md:block">投产上线</span>
                        </a>
                    </li>
                    
                    <!-- 新增的三个子菜单项 -->
                    <li class="mb-1">
                        <a href="quality_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-check-circle text-lg"></i>
                            <span class="hidden md:block">质量管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="security_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-shield text-lg"></i>
                            <span class="hidden md:block">安全管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="efficiency_metrics.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-bar-chart text-lg"></i>
                            <span class="hidden md:block">效能度量</span>
                        </a>
                    </li>
                    
                    <!-- 分隔线 -->
                    <li class="my-2">
                        <div class="border-t border-neutral-200 mx-4"></div>
                    </li>
                    
                    <!-- 公共模块 -->
                    <li class="mb-1">
                        <a href="teamManagement.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-users text-lg"></i>
                            <span class="hidden md:block">团队管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="settings.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-cog text-lg"></i>
                            <span class="hidden md:block">设置</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </aside>

        <main class="flex-1 ml-16 md:ml-64 p-4 md:p-6 bg-neutral-100 min-h-screen">
            <div class="mb-6">
                <nav class="flex" aria-label="面包屑">
                    <ol class="inline-flex items-center space-x-1 md:space-x-3">
                        <li class="inline-flex items-center">
                            <a href="index.html" class="text-sm font-medium text-neutral-500 hover:text-primary">
                                <i class="fa fa-home mr-2"></i>首页
                            </a>
                        </li>
                        <li>
                            <i class="fa fa-chevron-right text-neutral-400 text-xs mx-2"></i>
                            <a href="testManagement.html" class="text-sm font-medium text-neutral-500 hover:text-primary">测试管理</a>
                        </li>
                        <li>
                            <i class="fa fa-chevron-right text-neutral-400 text-xs mx-2"></i>
                            <span class="text-sm font-medium text-neutral-700">测试计划</span>
                        </li>
                    </ol>
                </nav>
            </div>

            <div class="mb-6">
                <h1 class="text-2xl font-bold text-neutral-800 flex items-center">
                    <i class="fa fa-calendar-check-o text-primary mr-3"></i>
                    测试计划管理
                </h1>
                <p class="text-sm text-neutral-500 mt-2">制定和管理测试计划，安排测试任务和资源</p>
            </div>

            <div class="bg-white rounded-lg shadow-sm p-4 mb-6">
                <div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
                    <div class="flex flex-wrap gap-2">
                        <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-all">
                            <i class="fa fa-plus mr-2"></i>新建计划
                        </button>
                        <button class="px-4 py-2 bg-white border border-neutral-300 text-neutral-700 rounded-lg hover:bg-neutral-50 transition-all">
                            <i class="fa fa-filter mr-2"></i>筛选
                        </button>
                    </div>
                    <div class="flex gap-2">
                        <input type="text" placeholder="搜索计划名称..." class="px-4 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary">
                        <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-all">
                            <i class="fa fa-search"></i>
                        </button>
                    </div>
                </div>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                <div class="bg-white rounded-lg shadow-sm p-6 hover:shadow-md transition-all cursor-pointer test-plan-card" data-plan-id="v1.0-system-test">
                    <div class="flex items-start justify-between mb-4">
                        <div class="flex-1">
                            <h3 class="text-lg font-semibold text-neutral-800 mb-2">V1.0版本系统测试</h3>
                            <p class="text-sm text-neutral-500">2024-01-15 至 2024-01-30</p>
                        </div>
                        <span class="px-2 py-1 text-xs rounded-full bg-success/10 text-success">进行中</span>
                    </div>
                    <div class="space-y-2 mb-4">
                        <div class="flex items-center text-sm text-neutral-600">
                            <i class="fa fa-user mr-2 text-neutral-400"></i>
                            <span>负责人：张三</span>
                        </div>
                        <div class="flex items-center text-sm text-neutral-600">
                            <i class="fa fa-file-text-o mr-2 text-neutral-400"></i>
                            <span>用例数：45</span>
                        </div>
                    </div>
                    <div class="mb-2">
                        <div class="flex justify-between text-sm text-neutral-600 mb-1">
                            <span>完成进度</span>
                            <span>65%</span>
                        </div>
                        <div class="w-full bg-neutral-200 rounded-full h-2">
                            <div class="bg-primary h-2 rounded-full" style="width: 65%"></div>
                        </div>
                    </div>
                </div>

                <div class="bg-white rounded-lg shadow-sm p-6 hover:shadow-md transition-all cursor-pointer">
                    <div class="flex items-start justify-between mb-4">
                        <div class="flex-1">
                            <h3 class="text-lg font-semibold text-neutral-800 mb-2">接口自动化测试</h3>
                            <p class="text-sm text-neutral-500">2024-02-01 至 2024-02-10</p>
                        </div>
                        <span class="px-2 py-1 text-xs rounded-full bg-neutral-200 text-neutral-600">待开始</span>
                    </div>
                    <div class="space-y-2 mb-4">
                        <div class="flex items-center text-sm text-neutral-600">
                            <i class="fa fa-user mr-2 text-neutral-400"></i>
                            <span>负责人：李四</span>
                        </div>
                        <div class="flex items-center text-sm text-neutral-600">
                            <i class="fa fa-file-text-o mr-2 text-neutral-400"></i>
                            <span>用例数：32</span>
                        </div>
                    </div>
                    <div class="mb-2">
                        <div class="flex justify-between text-sm text-neutral-600 mb-1">
                            <span>完成进度</span>
                            <span>0%</span>
                        </div>
                        <div class="w-full bg-neutral-200 rounded-full h-2">
                            <div class="bg-primary h-2 rounded-full" style="width: 0%"></div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <!-- 测试用例弹窗 -->
    <div id="testCasesModal" class="modal-overlay">
        <div class="modal-content">
            <div class="modal-header">
                <h3 class="modal-title">V1.0版本系统测试 - 测试用例</h3>
                <button class="modal-close" id="closeModal">&times;</button>
            </div>
            <div class="modal-body">
                <div class="space-y-2">
                    <!-- 测试用例1 -->
                    <div class="test-case-item">
                        <div class="test-case-info">
                            <div class="test-case-name">用户登录功能测试</div>
                            <div class="test-case-id">TC-001</div>
                        </div>
                        <div class="test-case-status">
                            <div class="status-selector" data-test-case-id="TC-001">
                                <button class="status-selector-toggle" onclick="toggleStatusSelector(this)">
                                    <span class="status-option">
                                        <span class="status-dot pending"></span>
                                        <span>待测试</span>
                                    </span>
                                    <i class="fa fa-chevron-down text-xs"></i>
                                </button>
                                <div class="status-selector-dropdown">
                                    <button class="status-option-item" onclick="selectStatus('TC-001', 'pending', '待测试')">
                                        <span class="status-dot pending"></span>
                                        <span>待测试</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-001', 'paused', '暂停')">
                                        <span class="status-dot paused"></span>
                                        <span>暂停</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-001', 'failed', '未通过')">
                                        <span class="status-dot failed"></span>
                                        <span>未通过</span>
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="test-case-actions">
                            <button class="action-button" onclick="toggleActionMenu(this)">操作</button>
                            <div class="dropdown-menu">
                                <button class="dropdown-item" onclick="createDefect('TC-001')">创建缺陷</button>
                                <button class="dropdown-item" onclick="associateDefect('TC-001')">关联缺陷</button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 测试用例2 -->
                    <div class="test-case-item">
                        <div class="test-case-info">
                            <div class="test-case-name">数据查询接口测试</div>
                            <div class="test-case-id">TC-002</div>
                        </div>
                        <div class="test-case-status">
                            <div class="status-selector" data-test-case-id="TC-002">
                                <button class="status-selector-toggle" onclick="toggleStatusSelector(this)">
                                    <span class="status-option">
                                        <span class="status-dot failed"></span>
                                        <span>未通过</span>
                                    </span>
                                    <i class="fa fa-chevron-down text-xs"></i>
                                </button>
                                <div class="status-selector-dropdown">
                                    <button class="status-option-item" onclick="selectStatus('TC-002', 'pending', '待测试')">
                                        <span class="status-dot pending"></span>
                                        <span>待测试</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-002', 'paused', '暂停')">
                                        <span class="status-dot paused"></span>
                                        <span>暂停</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-002', 'failed', '未通过')">
                                        <span class="status-dot failed"></span>
                                        <span>未通过</span>
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="test-case-actions">
                            <button class="action-button" onclick="toggleActionMenu(this)">操作</button>
                            <div class="dropdown-menu">
                                <button class="dropdown-item" onclick="createDefect('TC-002')">创建缺陷</button>
                                <button class="dropdown-item" onclick="associateDefect('TC-002')">关联缺陷</button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 测试用例3 -->
                    <div class="test-case-item">
                        <div class="test-case-info">
                            <div class="test-case-name">文件上传功能测试</div>
                            <div class="test-case-id">TC-003</div>
                        </div>
                        <div class="test-case-status">
                            <div class="status-selector" data-test-case-id="TC-003">
                                <button class="status-selector-toggle" onclick="toggleStatusSelector(this)">
                                    <span class="status-option">
                                        <span class="status-dot paused"></span>
                                        <span>暂停</span>
                                    </span>
                                    <i class="fa fa-chevron-down text-xs"></i>
                                </button>
                                <div class="status-selector-dropdown">
                                    <button class="status-option-item" onclick="selectStatus('TC-003', 'pending', '待测试')">
                                        <span class="status-dot pending"></span>
                                        <span>待测试</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-003', 'paused', '暂停')">
                                        <span class="status-dot paused"></span>
                                        <span>暂停</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-003', 'failed', '未通过')">
                                        <span class="status-dot failed"></span>
                                        <span>未通过</span>
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="test-case-actions">
                            <button class="action-button" onclick="toggleActionMenu(this)">操作</button>
                            <div class="dropdown-menu">
                                <button class="dropdown-item" onclick="createDefect('TC-003')">创建缺陷</button>
                                <button class="dropdown-item" onclick="associateDefect('TC-003')">关联缺陷</button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 测试用例4 -->
                    <div class="test-case-item">
                        <div class="test-case-info">
                            <div class="test-case-name">权限管理功能测试</div>
                            <div class="test-case-id">TC-004</div>
                        </div>
                        <div class="test-case-status">
                            <div class="status-selector" data-test-case-id="TC-004">
                                <button class="status-selector-toggle" onclick="toggleStatusSelector(this)">
                                    <span class="status-option">
                                        <span class="status-dot pending"></span>
                                        <span>待测试</span>
                                    </span>
                                    <i class="fa fa-chevron-down text-xs"></i>
                                </button>
                                <div class="status-selector-dropdown">
                                    <button class="status-option-item" onclick="selectStatus('TC-004', 'pending', '待测试')">
                                        <span class="status-dot pending"></span>
                                        <span>待测试</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-004', 'paused', '暂停')">
                                        <span class="status-dot paused"></span>
                                        <span>暂停</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-004', 'failed', '未通过')">
                                        <span class="status-dot failed"></span>
                                        <span>未通过</span>
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="test-case-actions">
                            <button class="action-button" onclick="toggleActionMenu(this)">操作</button>
                            <div class="dropdown-menu">
                                <button class="dropdown-item" onclick="createDefect('TC-004')">创建缺陷</button>
                                <button class="dropdown-item" onclick="associateDefect('TC-004')">关联缺陷</button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 测试用例5 -->
                    <div class="test-case-item">
                        <div class="test-case-info">
                            <div class="test-case-name">报表导出功能测试</div>
                            <div class="test-case-id">TC-005</div>
                        </div>
                        <div class="test-case-status">
                            <div class="status-selector" data-test-case-id="TC-005">
                                <button class="status-selector-toggle" onclick="toggleStatusSelector(this)">
                                    <span class="status-option">
                                        <span class="status-dot failed"></span>
                                        <span>未通过</span>
                                    </span>
                                    <i class="fa fa-chevron-down text-xs"></i>
                                </button>
                                <div class="status-selector-dropdown">
                                    <button class="status-option-item" onclick="selectStatus('TC-005', 'pending', '待测试')">
                                        <span class="status-dot pending"></span>
                                        <span>待测试</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-005', 'paused', '暂停')">
                                        <span class="status-dot paused"></span>
                                        <span>暂停</span>
                                    </button>
                                    <button class="status-option-item" onclick="selectStatus('TC-005', 'failed', '未通过')">
                                        <span class="status-dot failed"></span>
                                        <span>未通过</span>
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="test-case-actions">
                            <button class="action-button" onclick="toggleActionMenu(this)">操作</button>
                            <div class="dropdown-menu">
                                <button class="dropdown-item" onclick="createDefect('TC-005')">创建缺陷</button>
                                <button class="dropdown-item" onclick="associateDefect('TC-005')">关联缺陷</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 移动端菜单切换
        const menuToggle = document.getElementById('menuToggle');
        const aside = document.querySelector('aside');
        
        if (menuToggle && aside) {
            menuToggle.addEventListener('click', function() {
                aside.classList.toggle('-translate-x-full');
            });
        }

        // 设计管理菜单展开/收起功能
        document.addEventListener('DOMContentLoaded', function() {
            const designMenuToggle = document.getElementById('design-menu-toggle');
            const designSubmenu = document.getElementById('design-submenu');
            const designMenuWrapper = document.querySelector('.design-menu-wrapper');
            
            if (designMenuToggle && designSubmenu) {
                designMenuToggle.addEventListener('click', function(e) {
                    e.stopPropagation();
                    this.querySelector('i').classList.toggle('rotate-90');
                    if (designSubmenu.classList.contains('hidden')) {
                        designSubmenu.classList.remove('hidden');
                        setTimeout(() => {
                            designSubmenu.classList.remove('opacity-0');
                        }, 10);
                    } else {
                        designSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            designSubmenu.classList.add('hidden');
                        }, 300);
                    }
                });
                
                // 点击菜单项外部区域收起菜单
                document.addEventListener('click', function(e) {
                    if (designMenuWrapper && !designMenuWrapper.contains(e.target)) {
                        designSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            designSubmenu.classList.add('hidden');
                        }, 300);
                        if (designMenuToggle.querySelector('i')) {
                            designMenuToggle.querySelector('i').classList.remove('rotate-90');
                        }
                    }
                });
            }
            
            // 测试管理菜单展开/收起功能
            const testMenuToggle = document.getElementById('test-menu-toggle');
            const testSubmenu = document.getElementById('test-submenu');
            const testMenuWrapper = document.querySelector('.test-menu-wrapper');
            
            if (testMenuToggle && testSubmenu) {
                testMenuToggle.addEventListener('click', function(e) {
                    e.stopPropagation();
                    this.querySelector('i').classList.toggle('rotate-90');
                    if (testSubmenu.classList.contains('hidden')) {
                        testSubmenu.classList.remove('hidden');
                        setTimeout(() => {
                            testSubmenu.classList.remove('opacity-0');
                        }, 10);
                    } else {
                        testSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            testSubmenu.classList.add('hidden');
                        }, 300);
                    }
                });
                
                // 点击菜单项外部区域收起菜单
                document.addEventListener('click', function(e) {
                    if (testMenuWrapper && !testMenuWrapper.contains(e.target)) {
                        testSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            testSubmenu.classList.add('hidden');
                        }, 300);
                        if (testMenuToggle.querySelector('i')) {
                            testMenuToggle.querySelector('i').classList.remove('rotate-90');
                        }
                    }
                });
            }
        });

        // 测试计划弹窗功能
        const testPlanCards = document.querySelectorAll('.test-plan-card');
        const testCasesModal = document.getElementById('testCasesModal');
        const closeModal = document.getElementById('closeModal');
        
        // 点击测试计划卡片打开弹窗
        testPlanCards.forEach(card => {
            card.addEventListener('click', function(e) {
                // 防止点击操作按钮时触发弹窗
                if (!e.target.closest('.action-button')) {
                    testCasesModal.classList.add('active');
                    document.body.style.overflow = 'hidden';
                }
            });
        });
        
        // 关闭弹窗
        closeModal.addEventListener('click', function() {
            testCasesModal.classList.remove('active');
            document.body.style.overflow = '';
        });
        
        // 点击弹窗外部关闭
        testCasesModal.addEventListener('click', function(e) {
            if (e.target === testCasesModal) {
                testCasesModal.classList.remove('active');
                document.body.style.overflow = '';
            }
        });
        
        // 操作按钮下拉菜单功能
        function toggleActionMenu(button) {
            const dropdownMenu = button.nextElementSibling;
            const isActive = dropdownMenu.classList.contains('active');
            
            // 关闭所有其他下拉菜单
            document.querySelectorAll('.dropdown-menu.active').forEach(menu => {
                if (menu !== dropdownMenu) {
                    menu.classList.remove('active');
                }
            });
            
            // 切换当前下拉菜单
            dropdownMenu.classList.toggle('active', !isActive);
        }
        
        // 点击页面其他位置关闭下拉菜单
        document.addEventListener('click', function(e) {
            if (!e.target.closest('.test-case-actions')) {
                document.querySelectorAll('.dropdown-menu.active').forEach(menu => {
                    menu.classList.remove('active');
                });
            }
        });
        
        // 创建缺陷功能
        function createDefect(testCaseId) {
            alert(`为测试用例 ${testCaseId} 创建缺陷`);
            // 这里可以添加实际的创建缺陷逻辑
        }
        
        // 关联缺陷功能
        function associateDefect(testCaseId) {
            alert(`为测试用例 ${testCaseId} 关联缺陷`);
            // 这里可以添加实际的关联缺陷逻辑
        }
        
        // ESC键关闭弹窗
        document.addEventListener('keydown', function(e) {
            if (e.key === 'Escape' && testCasesModal.classList.contains('active')) {
                testCasesModal.classList.remove('active');
                document.body.style.overflow = '';
            }
        });

        // 状态选择器功能
        function toggleStatusSelector(button) {
            const selector = button.parentElement;
            const dropdown = selector.querySelector('.status-selector-dropdown');
            const isActive = dropdown.classList.contains('active');
            
            // 关闭所有其他状态选择器
            document.querySelectorAll('.status-selector-dropdown.active').forEach(menu => {
                if (menu !== dropdown) {
                    menu.classList.remove('active');
                    menu.previousElementSibling.classList.remove('active');
                }
            });
            
            // 关闭所有操作下拉菜单
            document.querySelectorAll('.dropdown-menu.active').forEach(menu => {
                menu.classList.remove('active');
            });
            
            // 切换当前状态选择器
            button.classList.toggle('active', !isActive);
            dropdown.classList.toggle('active', !isActive);
        }
        
        function selectStatus(testCaseId, status, label) {
            // 更新状态选择器显示
            const selector = document.querySelector(`.status-selector[data-test-case-id="${testCaseId}"]`);
            const toggle = selector.querySelector('.status-selector-toggle');
            const statusOption = toggle.querySelector('.status-option');
            
            // 更新显示内容
            statusOption.innerHTML = `
                <span class="status-dot ${status}"></span>
                <span>${label}</span>
            `;
            
            // 关闭下拉菜单
            toggle.classList.remove('active');
            selector.querySelector('.status-selector-dropdown').classList.remove('active');
            
            // 这里可以添加后端数据绑定的逻辑
            updateTestCaseStatus(testCaseId, status, label);
        }
        
        function updateTestCaseStatus(testCaseId, status, label) {
            // 模拟后端数据更新
            console.log(`更新测试用例 ${testCaseId} 的状态为: ${label} (${status})`);
            
            // 这里可以添加实际的API调用
            // fetch(`/api/test-cases/${testCaseId}/status`, {
            //     method: 'PUT',
            //     headers: {
            //         'Content-Type': 'application/json',
            //     },
            //     body: JSON.stringify({
            //         status: status,
            //         label: label
            //     })
            // })
            // .then(response => response.json())
            // .then(data => {
            //     console.log('状态更新成功:', data);
            // })
            // .catch(error => {
            //     console.error('状态更新失败:', error);
            // });
        }
        
        // 点击页面其他位置关闭状态选择器
        document.addEventListener('click', function(e) {
            if (!e.target.closest('.status-selector')) {
                document.querySelectorAll('.status-selector-dropdown.active').forEach(dropdown => {
                    dropdown.classList.remove('active');
                    dropdown.previousElementSibling.classList.remove('active');
                });
            }
        });
    </script>
</body>
</html>
